
#pragma once

#include "tools/meta/property_const.h"
#include "tools/meta/remove_extend.h"

namespace tools{

    namespace arg_detail
    {
        template<class T> struct PropertyArray
        {
            typedef typename ::std::remove_reference<T>::type           Array;
            typedef typename ::std::add_lvalue_reference<Array>::type   ArrayReference;

            typedef typename ::std::add_pointer<Array>::type            PointerArray;
            typedef typename ::std::add_pointer<PointerArray>::type     PPointerArray;

            typedef typename RemoveExtend<Array>::Base                  Element;
            typedef typename PropertyConst<Element>::NoConst            NoConstElement;
            typedef typename ::std::add_pointer<NoConstElement>::type   NoConstCastPointer;

            enum { eIS_ARRAY = ::std::is_array<Array>::value };
        };

        template<class T> struct PropertyString
        {
            enum { eIS_STRING = ::std::is_same<::std::string, T>::value };
            enum { eSTRING = ::std::is_same<::std::string, T>::value    };
        };

    }//namespace details
}//namespace tools